<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <include file="Public:jquery" />
        <script type="text/javascript" src="__PUBLIC__/js/jQuery/plugin/jquery.filestyle.js"></script>
        <include file="Public:dialog" />
        <include file="Public:ajaxupload" />
        <script type="text/javascript">
            $(function(){
            	submitstyle();
            	var getActionName = '{:MODULE_NAME}';
                var actionName = getActionName.toLowerCase();
                $('li[rel="' + actionName + '"]').addClass('this');
            	
                var getID = "{$_GET['tag']}";
                $('.admin_ui_menu li').each(function(){
                    $(this).removeClass('this');
                });
                $('li[rel="'+getID+'"]').addClass('this');
                $('li:first').css({
                    'border-left' : '1px solid #333'
                });
                
                inputFileStyle();
                
				
				_checkpress('input[name="name"]');
				
				$('form').submit(function(){
					if (_checkform('input[name="name"]','*分类名称必须填写') == false) return false;
				});
            });
            
			function inputFileStyle () {
			  	$("input[type=file]").filestyle({
					image : "../Public/images/chk.png",
					imageheight : 25,
					imagewidth : 86,
					width : 260
				});
			}
            
        </script>
    </head>
    <body>
        <include file="Public:header" />
        
        <div class="layout">
            
            <include file="Public:position" />
            
            <table class="warp" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="sidebar" valign="top">
                        <include file="Public:sidebar" />
                    </td>
                    <td class="contents" valign="top">
                        
                        <div class="a_table">
                        <form action="__URL__/insert" method="post" name="addCategoryPost">
				    	<input type="hidden" name="pid" value="{$_GET['pid']}" />
				    	<input type="hidden" name="type" value="{$_GET['type']}" />
				    	<input type="hidden" name="nav" value="{$_GET['nav']}" />
				    	<input type="hidden" name="channel" value="{$_GET['channel']}" />
				    	<input type="hidden" name="level" value="{$_GET['level']}" />
				    	<input type="hidden" name="lang" value="{$_GET['lang']}" />
						<table cellspacing="1" class="form_table">
							<tr>
								<td align="right" class="left_text" width="90">分类名称</td>
								<td align="left"><input type="text" name="name" id="name" class="input_text w480" /></td>
							</tr>
							<tr>
								<td align="right" class="left_text">自定义模板</td>
								<td align="left"><input type="text" name="tpl" class="input_text" /> *无需路径，无需后缀名，填写模板文件名即可</td>
							</tr>
							<tr>
								<td align="right" class="left_text">状态</td>
								<td align="left">
									<input type="radio" name="status" value="1" checked="checked" /> 正常 &nbsp; 
									<input type="radio" name="status" value="0" /> 隐藏
								</td>
							</tr>
							<?php
								if ($_GET['type'] != 'url'){
							?>
							<tr id="set_banner">
								<td align="right" class="left_text">分类Banner设置</td>
								<td align="left">
									<span class="file_d_Upload">
										<input id="filedata" type="file" class="attText" name="filedata">
										<button class="attButton" id="buttonUpload" onclick="return ajaxFileUpload();">上传文件</button>
									</span>
								</td>
							</tr>
							<?php
								}
							?>
							<tr style="display:none;" id="loading">
								<td></td>
								<td align='left'><img src="../Public/images/loading.gif" /></td>
							</tr>
							<tr>
								<td align="right" class="left_text">分类关键字</td>
								<td align="left"><input name="keyword" type="text" class="input_text w480" /> (SEO)</td>
							</tr>
							<tr>
								<td align="right" class="left_text">分类描述</td>
								<td align="left"><textarea name="description" class="input_text" style="width: 600px; height:140px;"></textarea> (SEO)</td>
							</tr>
							<tr>
								<td align="right" class="left_text"></td>
								<td align="left"><div class="submit_default_box"><input type="submit" class="submit_default" value="提交表单" /><span class="submit_default_icon" id="submit_icon"></span></div></td>
							</tr>
						</table>
						</form>
                        	
                        
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        
        <include file="Public:footer" />
    </body>
</html>